import 'package:fluro/fluro.dart';
import 'package:flutter/material.dart';
import 'package:flutternettest/global/application.dart';
import 'package:flutternettest/pages/test_login_page.dart';

import 'global/routers.dart';
import 'pages/welcome_page.dart';

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {



  @override
  _MyAppState createState() => _MyAppState();

  MyApp(){
    Router router = Router();
    Routers.configRouters(router);
    Application.mRouter = router;
  }
}

class _MyAppState extends State<MyApp> {
  int primaryColor = Application.mColors.primaryColor;
  int textColor = Application.mColors.textColorCommon;
  int bgColor = Application.mColors.backgroundColor;

  @override
  Widget build(BuildContext context) {

    return MaterialApp(
      title: '医掌宝',
      home: TestLogin(),
      theme: ThemeData(
          primaryColor:Color(primaryColor),
          backgroundColor: Color(bgColor),
          accentColor: Color(primaryColor),
          textTheme: TextTheme(
              body1: TextStyle(color: Color(textColor),fontSize: Application.mDimens.titleSize)
          ),
          iconTheme: IconThemeData(
            size: 35.0,
            color: Color(primaryColor),
          )

      ),
      onGenerateRoute: Application.mRouter.generator,
    );
  }
}
